var selfCallback;

export var listen = (event, callback) => {
    window.addEventListener("storage", selfCallback = (e) => {
         if(e.key === event && e.newValue == 1){
             callback();
         }
    });
};
export function unListen(){
    window.removeEventListener("storage", selfCallback);
};
